package com.chee.plant.hibernate.object.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the battle_log table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="battle_log"
 */

public abstract class BaseBattleLog  implements Serializable {

	public static String REF = "BattleLog";
	public static String PROP_DEFENSER_ID = "DefenserId";
	public static String PROP_DAMAGE = "Damage";
	public static String PROP_OFFENSER_TYPE = "OffenserType";
	public static String PROP_SKILL_ID = "SkillId";
	public static String PROP_DEFENSER_DEAD = "DefenserDead";
	public static String PROP_DEFENSER_TYPE = "DefenserType";
	public static String PROP_ID = "Id";
	public static String PROP_OFFENSER_ID = "OffenserId";
	public static String PROP_BATTLE_ID = "BattleId";


	// constructors
	public BaseBattleLog () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseBattleLog (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseBattleLog (
		java.lang.Integer id,
		java.lang.Integer battleId,
		java.lang.Integer offenserType,
		java.lang.Integer offenserId,
		java.lang.Integer defenserType,
		java.lang.Integer defenserId,
		java.lang.Integer skillId,
		java.lang.Integer damage,
		java.lang.Integer defenserDead) {

		this.setId(id);
		this.setBattleId(battleId);
		this.setOffenserType(offenserType);
		this.setOffenserId(offenserId);
		this.setDefenserType(defenserType);
		this.setDefenserId(defenserId);
		this.setSkillId(skillId);
		this.setDamage(damage);
		this.setDefenserDead(defenserDead);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer battleId;
	private java.lang.Integer offenserType;
	private java.lang.Integer offenserId;
	private java.lang.Integer defenserType;
	private java.lang.Integer defenserId;
	private java.lang.Integer skillId;
	private java.lang.Integer damage;
	private java.lang.Integer defenserDead;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: battle_id
	 */
	public java.lang.Integer getBattleId () {
		return battleId;
	}

	/**
	 * Set the value related to the column: battle_id
	 * @param battleId the battle_id value
	 */
	public void setBattleId (java.lang.Integer battleId) {
		this.battleId = battleId;
	}



	/**
	 * Return the value associated with the column: offenser_type
	 */
	public java.lang.Integer getOffenserType () {
		return offenserType;
	}

	/**
	 * Set the value related to the column: offenser_type
	 * @param offenserType the offenser_type value
	 */
	public void setOffenserType (java.lang.Integer offenserType) {
		this.offenserType = offenserType;
	}



	/**
	 * Return the value associated with the column: offenser_id
	 */
	public java.lang.Integer getOffenserId () {
		return offenserId;
	}

	/**
	 * Set the value related to the column: offenser_id
	 * @param offenserId the offenser_id value
	 */
	public void setOffenserId (java.lang.Integer offenserId) {
		this.offenserId = offenserId;
	}



	/**
	 * Return the value associated with the column: defenser_type
	 */
	public java.lang.Integer getDefenserType () {
		return defenserType;
	}

	/**
	 * Set the value related to the column: defenser_type
	 * @param defenserType the defenser_type value
	 */
	public void setDefenserType (java.lang.Integer defenserType) {
		this.defenserType = defenserType;
	}



	/**
	 * Return the value associated with the column: defenser_id
	 */
	public java.lang.Integer getDefenserId () {
		return defenserId;
	}

	/**
	 * Set the value related to the column: defenser_id
	 * @param defenserId the defenser_id value
	 */
	public void setDefenserId (java.lang.Integer defenserId) {
		this.defenserId = defenserId;
	}



	/**
	 * Return the value associated with the column: skill_id
	 */
	public java.lang.Integer getSkillId () {
		return skillId;
	}

	/**
	 * Set the value related to the column: skill_id
	 * @param skillId the skill_id value
	 */
	public void setSkillId (java.lang.Integer skillId) {
		this.skillId = skillId;
	}



	/**
	 * Return the value associated with the column: damage
	 */
	public java.lang.Integer getDamage () {
		return damage;
	}

	/**
	 * Set the value related to the column: damage
	 * @param damage the damage value
	 */
	public void setDamage (java.lang.Integer damage) {
		this.damage = damage;
	}



	/**
	 * Return the value associated with the column: defenser_dead
	 */
	public java.lang.Integer getDefenserDead () {
		return defenserDead;
	}

	/**
	 * Set the value related to the column: defenser_dead
	 * @param defenserDead the defenser_dead value
	 */
	public void setDefenserDead (java.lang.Integer defenserDead) {
		this.defenserDead = defenserDead;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.chee.plant.hibernate.object.BattleLog)) return false;
		else {
			com.chee.plant.hibernate.object.BattleLog battleLog = (com.chee.plant.hibernate.object.BattleLog) obj;
			if (null == this.getId() || null == battleLog.getId()) return false;
			else return (this.getId().equals(battleLog.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

private static final long serialVersionUID = 1L; 
}